In mass-storage systems it is known to use a disk controller device to manage the delegation of tasks onto the disk or disks associated with the controller. Commonly, in order to fetch data from the disk or in order to destage data into the disk, appropriate tasks are generated by the components of the mass-storage system, for example by one or more disk controllers that may or may not be part of caches. The disk controller is responsible for managing the delegation of the fetch or the destage tasks to the disk(s). At any given time, the disk controller may be simultaneously handling many tasks of both kinds. In order to control the order by which the tasks are forwarded to the disk, the disk controller employs queue management algorithms and/or hardware. The order by which the fetch and destage tasks are forwarded to the disk, may influence the mass-storage system's performance, as will be briefly discussed below.
A fetch task is configured to instruct the disk to bring into the cache a specific segment of data. Fetch tasks may be generated by a cache or by any other suitable component of the mass-storage system, for example, in response to a “read” service request. In order to complete the servicing of the read request, all the requested data must have been retrieved from the disk and stored either in the cache (whether fetched or already in the cache) or in the interfaces. Thus delays in completing fetch tasks directed at the disks may have a significant negative influence on the overall performance of the system.
A destage task is configured to cause the disk to receive and store a certain segment of data which is temporarily stored in the cache. Destage tasks may be associated, for example, with “write” requests, and may be generated by a cache following the temporary storage of the data associated with the write request in the cache. The temporary storage of the data in the cache associated with the write request, enables the mass-storage system to avoid having to wait for the completion of the substantially lengthy process of storing the data in the disk before acknowledging the request. In addition, by enabling the cache to acknowledge the write request prior to the data being stored in the disk, the controller may choose to delay one or more destage tasks, and to prioritize one or more fetch tasks that must be completed in order for the corresponding read requests to be serviced.
However, destage tasks should not be delayed in an uncontrolled and categorical manner, since if too much destage-pending data, also known as “dirty data”, is allowed to be accumulated in the cache, the cache's performance may gradually diminish, and the system's performance may be significantly hampered.
Another aspect of fetch and destage task management, relates to the task management queuing mechanisms which may be employed by the disk device(s). The disk queuing mechanisms receive the fetch and destage tasks from the controller, and implement various task reordering schemes aimed at optimizing the overall performance of the disk device(s). However, once a task reaches the disk's task queue, it is handled exclusively by the disk's queuing mechanisms and the controller or any other component of the mass-storage system may not interfere with the process. As a result, the longer the disk's tasks queue is, the more detached it becomes from events occurring outside the disk. Thus, in general the contribution of the disk's internal queuing mechanisms to the overall performance may gradually decrease inversely to the length of the disk's task queue, and therefore the length of the disk's task queue should be controlled.
These factors should be taken into consideration, in specific, by the controller, when considering which kind of task or tasks and/or what number of each kind of tasks should be delegated to the disk(s) at a given point in time.
Several methodologies, systems and circuits for managing tasks queues are known and have been implemented. Enhancements and improvements to existing cache management and storage solutions are needed.